package com.boot.aiproject.web;

import com.boot.aiproject.service.AiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AiController {

    @Autowired
    private AiService aiService;
    @GetMapping("/chat")
    public String chatCompletion(String question) {
        System.out.println("question:----------" + question);
        return aiService.chat(question);
    }
    @GetMapping("/img")
    public String imgGeneration(String question) {
        System.out.println("question:----------" + question);
        return aiService.img(question);
    }





}
